package by.dvrudenko.avtobaza.webapp.page.createResponses;

import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
import org.apache.wicket.markup.html.link.Link;

import by.dvrudenko.avtobaza.datamodel.Responses;
import by.dvrudenko.avtobaza.webapp.page.BaseLayout;
import by.dvrudenko.avtobaza.webapp.page.createResponses.panel.ResponsesListPanel;
import by.dvrudenko.avtobaza.webapp.utils.security.SecuredLinkForUser;

public class ResponsesPage extends BaseLayout {
	

	public ResponsesPage() {

		add(new ResponsesListPanel("responses-list"));

		Link<Void> createResponses = new SecuredLinkForUser("createResponses") {

			@Override
			public void onClick() {
				Responses response = new Responses();
				setResponsePage(new CreateResponsesPage(response));
			};
		};
		add(createResponses);

	}

}
